package com.icode.core.model.house;

import com.icode.core.model.AbstractEntity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Created with IntelliJ IDEA.
 * User: SunKai
 * Date: 14-10-26
 * Time: 下午5:45
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name="house_info_supporting")
public class HouseInfoSupporting extends AbstractEntity {
    @ManyToOne
    @JoinColumn(name="house_info_id")
    private HouseInfo houseInfo;

    @ManyToOne
    @JoinColumn(name="supporting_id")
    private Equipment equipment;

    public HouseInfoSupporting() {
    }

    public HouseInfoSupporting(HouseInfo houseInfo, Equipment equipment) {
        this.houseInfo = houseInfo;
        this.equipment = equipment;
    }

    public HouseInfo houseInfo() {
        return houseInfo;
    }

    public Equipment equipment() {
        return equipment;
    }
}
